package cn.lcsjsxy.yxc.objectoriented;

public class OrderTest {
    private int orderPrivate;
    int orderDefault;
    protected int ordertProtected;  //子类还未学习
    public int ordertPublic;

    //最小的权限private也可以在类中使用，但出了所在类之后，私有（private）的结构就不能调用了
    private void methodPrivate() {
        orderPrivate = 10;
        orderDefault = 10;
        ordertPublic = 10;
    }

    //出了所在包之后，私有的和缺省的结构就不能调用了
    void methodDefault() {
        orderPrivate = 10;
        orderDefault = 10;
        ordertPublic = 10;
    }

    public void methodPublic() {
        orderPrivate = 10;
        orderDefault = 10;
        ordertPublic = 10;
    }
}
